package com.pango.core.support;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.pango.core.utils.ContextUtils;

/**
 * 注入上下文
 * @author thierry.fu
 *
 */

public class ApplicationContextRegister implements ApplicationContextAware{
	
	private Log log = LogFactory.getLog(getClass());
	
	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		ContextUtils.setApplicationContext(applicationContext);
		log.debug("ApplicationContext registed");
	}

}
